package com.zeratul.common.satoken.domain.entity;

import com.zeratul.common.satoken.domain.entity.base.LoginUserAdapter;
import com.zeratul.common.satoken.enums.UserType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 开放平台用户
 */
@Data
@Accessors(chain = true)
public class OpenUser extends LoginUserAdapter {

    /**
     * 平台AppId
     */
    private String appId;

    /**
     * 返回用户ID
     */
    @Override
    public String getUserId() {
        return appId;
    }

    /**
     * 返回用户类型
     */
    @Override
    public UserType getUserType() {
        return UserType.OPEN_USER;
    }
}
